package com.gjsh.c_object;

public class Test01 {
    public static void main(String[] args) {
        Citizen citizen = new Citizen();
        citizen.name = "张三";
        citizen.idCard = "123456789987465132";
        /*
           citizen.birthday获取的是MyDate对象
           再去点year获取的是MyDate对象的year
           链式调用
         */
        citizen.birthday = new MyDate();
        citizen.birthday.yeat = 2000;
        citizen.birthday.day = 20;
        citizen.birthday.month = 20;
        System.out.println(citizen.name);
        System.out.println(citizen.idCard);
        System.out.println(citizen.birthday.yeat);
    }
}
